package com.rcloud.server.sealtalk.controller.param;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.math.BigDecimal;

/**
 * @Author hyy
 * @Description: Date: Create in 13:48 2020/8/9
 * Modified:
 */
@ApiModel(value = "请求参数-")
public class PacketSendRequest {
    /**
     * 红包ID
     */
    @ApiModelProperty(value = "")
    private Long envId;

    /**
     * 红包信息
     */
    @ApiModelProperty(value = "")
    private String envMsg = "恭喜发财";

    @ApiModelProperty(value = "")
    private String content;

    @ApiModelProperty(value = "")
    private String from;

    @ApiModelProperty(value = "")
    private String to;
    @ApiModelProperty(value = "专属人id，type为1时必传")
    private String userId;
    @ApiModelProperty(value = "0 普通红包 1 专属红包")
    private Integer type;
    private BigDecimal redpacketMoney;
    private String pushContent;
    private String ctime;
    private String bankInfo;

    public String getCtime() {
        return ctime;
    }

    public void setCtime(String ctime) {
        this.ctime = ctime;
    }

    public String getBankInfo() {
        return bankInfo;
    }

    public void setBankInfo(String bankInfo) {
        this.bankInfo = bankInfo;
    }

    public String getPushContent() {
        return pushContent;
    }

    public void setPushContent(String pushContent) {
        this.pushContent = pushContent;
    }

    public BigDecimal getRedpacketMoney() {
        return redpacketMoney;
    }

    public void setRedpacketMoney(BigDecimal redpacketMoney) {
        this.redpacketMoney = redpacketMoney;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Long getEnvId() {
        return envId;
    }

    public void setEnvId(Long envId) {
        this.envId = envId;
    }

    public String getEnvMsg() {
        return envMsg;
    }

    public void setEnvMsg(String envMsg) {
        this.envMsg = envMsg;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getFrom() {
        return from;
    }

    public void setFrom(String from) {
        this.from = from;
    }

    public String getTo() {
        return to;
    }

    public void setTo(String to) {
        this.to = to;
    }

    public void valid() {
        if (envId == null) throw new AssertionError();
        if (envMsg == null) throw new AssertionError();
        if (from == null) throw new AssertionError();
//        if (to == null) throw new AssertionError();
//        if (type == 1) {
//            if (userId == null) throw new AssertionError();
//        }
    }
}
